Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust buffer size instead of cpu-per-core #1706

Merged
merged 3 commits into from
Jun 13, 2024
Merged

Conversation

erthalion
Copy link
Contributor

@erthalion erthalion commented Jun 11, 2024

Description

It turns out making many CPU cores working with a single ringbuf has a potential deadlock hazard, especially visible on RT kernels. To avoid even a slightest danger, reduce ringbuf size instead. In the new scenario if we do not fit into the total ringbuf size, the size of each individual ringbuf will be adjusted and aligned for readability.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

Testing Performed

Manual testing.

It turns out making many CPU cores working with a single ringbuf has a
potential deadlock hazard, especially visible on RT kernels. To avoid
even a slightest danger, reduce ringbuf size instead. In the new
scenario if we do not fit into the total ringbuf size, the size of each
individual ringbuf will be adjusted and aligned for readability.
@erthalion erthalion requested a review from a team as a code owner June 11, 2024 13:41
Copy link
Collaborator

@Molter73 Molter73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@erthalion erthalion added the run-multiarch-builds Run steps for non-x86 archs. label Jun 12, 2024
Currently used int type is not enough when it comes to values like a few
GiB, expressed in the number of bytes, making it impossible to set some
reasonable values. Use long type for ROX_COLLECTOR_SINSP_BUFFER_SIZE,
ROX_COLLECTOR_SINSP_TOTAL_BUFFER_SIZE,
ROX_COLLECTOR_SINSP_THREAD_CACHE_SIZE.
@erthalion erthalion merged commit 66fe51f into master Jun 13, 2024
50 checks passed
@erthalion erthalion deleted the fix/adjust-ringbuf-size branch June 13, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-multiarch-builds Run steps for non-x86 archs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants